package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.MjUserOrderStatus;

import java.util.List;

public interface MjUserOrderStatusMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MjUserOrderStatus record);

    int insertSelective(MjUserOrderStatus record);

    MjUserOrderStatus selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjUserOrderStatus record);

    int updateByPrimaryKey(MjUserOrderStatus record);

    int updateAssistant(@Param("userId") Integer userId, @Param("orderId") Integer orderId, @Param("nowStatus") Integer nowStatus, @Param("nextStatus") Integer nextStatus);

    List<MjUserOrderStatus> selectByUserIdAndOrderId(@Param("userId") Integer userId, @Param("orderId") Integer orderId);

    List<MjUserOrderStatus> selectByOrderIdAndStatus(@Param("orderId") Integer orderId, @Param("orderStatus") Integer orderStatus);

    MjUserOrderStatus selectObjByUserIdAndOrderId(@Param("userId") Integer userId, @Param("orderId") Integer orderId);

    int insertBatch(@Param("orderStatusList") List<MjUserOrderStatus> orderStatusList);

    int updateOrderStatusByOrderIdAndUserId(@Param("orderId") Integer orderId, @Param("userId") Integer userId, @Param("orderStatus") Integer orderStatus);
    int updateOrderStatusByOrderIdAndUserId(@Param("id") Integer id);

    List<MjUserOrderStatus> selectAllListByOrderId(@Param("orderId") Integer id);

    List<MjUserOrderStatus> selectTaskListByStatusList(@Param("statusList") List<Integer> statusList);

    int updateOrderStatusById(@Param("id") Integer id, @Param("status") int status);
}